﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class InvinimFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As InvinimBE
        Dim tmpInvinim As InvinimBE = New InvinimBE()
        Try
            With tmpInvinim
                .Almacen = convertDTFromDb.ConvertString(dr.Item("Almacen"))
                .Clasificacion = convertDTFromDb.ConvertString(dr.Item("Clasificacion"))
                .Clave = convertDTFromDb.ConvertString(dr.Item("Clave"))
                .Costo = convertDTFromDb.ConvertDecimal(dr.Item("Costo"))
                .Descrip = convertDTFromDb.ConvertString(dr.Item("Descrip"))
                .Exist = convertDTFromDb.ConvertDecimal(dr.Item("Exist"))
                .Fecha = convertDTFromDb.convertDateTime(dr.Item("Fecha"))
                .Id = convertDTFromDb.convertInt32(dr.Item("Id"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .PVta = convertDTFromDb.ConvertDecimal(dr.Item("PVta"))
                .Ubicacion = convertDTFromDb.ConvertString(dr.Item("Ubicacion"))
                .UM = convertDTFromDb.ConvertString(dr.Item("UM"))
            End With
            Return tmpInvinim
        Catch ex As Exception
            Throw
        Finally
            tmpInvinim = Nothing
        End Try
    End Function
End Class
